package knowledge.content.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

import knowledge.content.type.model.KNContentType;

import com.googlecode.jtiger.core.model.BaseIdModel;

@SuppressWarnings("serial")
@Entity
@Table(name = "KN_CONTENTS")
public class KNContent extends BaseIdModel {
	private String title;
	private String content;
	private KNContentType knContentType;

	@Column(name = "TITLE", length = 100)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT", length = 20000)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "CONTENT_TYPE_ID")
	public KNContentType getKnContentType() {
		return knContentType;
	}

	public void setKnContentType(KNContentType knContentType) {
		this.knContentType = knContentType;
	}
}
